Test latency jitter under stress condition Single-threaded executor Default autoware with hot path

In [1]:
from caret_analyze.plot import Plot
from caret_analyze.plot import chain_latency
from caret_analyze import Application, Architecture, Lttng
from bokeh.plotting import output_notebook, figure, show
from caret_analyze import Architecture, Application, Lttng
from bokeh.plotting import output_notebook
output_notebook()
/usr/local/lib/python3.10/dist-packages/pandas/core/arrays/masked.py:62: UserWarning: Pandas requires version '1.3.4' or newer of 'bottleneck' (version '1.3.2' currently installed).
  from pandas.core import (
Succeed to find record_cpp_impl. the C++ version will be used.
Loading BokehJS ...

End-to-End path¶

In [54]:
lttng = Lttng('./multi_threaded_executor_stress')
arch = Architecture('yaml','./architecture_with_e2e_path.yaml')
# arch = Architecture('lttng','./single_threaded_executor_normal')
app = Application(arch, lttng)
309553 events found.
loading: 100%|████████████████████████████████████████████████████████████| 309553/309553 [00:09<00:00, 33438.32it/s]
In [3]:
# arch.export('architecture.yaml')
In [ ]:
# p = arch.search_paths('/FrontLidarDriver','/RayGroundFilter','/MPCController','/VehicleDBWSystem')
# p[0].summary.pprint()
In [13]:
# arch.add_path('e2e_path',p[0])
# app =Application(arch,lttng)
In [14]:
# arch.export('architecture_with_e2e_path.yaml')
In [56]:
path = app.get_path('e2e_path')
path.verify()
WARNING : 2024-01-05 16:03:03 | 'caret/rclcpp' may not be used in subscriber of '/PointsTransformerFront'.
WARNING : 2024-01-05 16:03:03 | 'caret/rclcpp' may not be used in subscriber of '/PointCloudFusion'.
WARNING : 2024-01-05 16:03:03 | 'caret/rclcpp' may not be used in subscriber of '/RayGroundFilter'.
WARNING : 2024-01-05 16:03:03 | 'caret/rclcpp' may not be used in subscriber of '/EuclideanClusterDetector'.
WARNING : 2024-01-05 16:03:03 | 'caret/rclcpp' may not be used in subscriber of '/ObjectCollisionEstimator'.
WARNING : 2024-01-05 16:03:03 | 'caret/rclcpp' may not be used in subscriber of '/BehaviorPlanner'.
WARNING : 2024-01-05 16:03:03 | 'caret/rclcpp' may not be used in subscriber of '/MPCController'.
WARNING : 2024-01-05 16:03:03 | 'caret/rclcpp' may not be used in subscriber of '/VehicleInterface'.
WARNING : 2024-01-05 16:03:03 | 'caret/rclcpp' may not be used in subscriber of '/VehicleDBWSystem'.
Out[56]:
False
In [57]:
chain_latency(path, granularity='node', lstrip_s=0, rstrip_s=0)
Out[57]:
No description has been provided for this image
In [58]:
chain_latency(path, granularity='end-to-end', lstrip_s=0, rstrip_s=0)
Out[58]:
No description has been provided for this image
In [59]:
# plot best case
plot = Plot.create_response_time_timeseries_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision
BokehUserWarning: out of range integer may result in loss of precision
In [60]:
# plot best case
plot = Plot.create_response_time_histogram_plot(path, case='best')
plot.show()
WARNING : 2024-01-05 16:03:51 | The maximum number of legends drawn by default is 20. If you want all legends to be displayed, please specify the `full_legends` option to True.
In [61]:
# plot best case
plot = Plot.create_response_time_stacked_bar_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision
BokehUserWarning: out of range integer may result in loss of precision

Hot Path¶

In [62]:
lttng = Lttng('./multi_threaded_executor_stress')
arch = Architecture('yaml','./architecture_with_hot_path.yaml')
# arch = Architecture('lttng','./single_threaded_executor_normal')
app = Application(arch, lttng)
309553 events found.
loading: 100%|████████████████████████████████████████████████████████████| 309553/309553 [00:09<00:00, 32233.69it/s]
In [63]:
path = app.get_path('hot_path')
path.verify()
WARNING : 2024-01-05 16:06:29 | 'caret/rclcpp' may not be used in subscriber of '/PointsTransformerFront'.
WARNING : 2024-01-05 16:06:29 | 'caret/rclcpp' may not be used in subscriber of '/PointCloudFusion'.
WARNING : 2024-01-05 16:06:29 | 'caret/rclcpp' may not be used in subscriber of '/RayGroundFilter'.
WARNING : 2024-01-05 16:06:29 | 'caret/rclcpp' may not be used in subscriber of '/EuclideanClusterDetector'.
WARNING : 2024-01-05 16:06:29 | 'caret/rclcpp' may not be used in subscriber of '/ObjectCollisionEstimator'.
Out[63]:
False
In [64]:
chain_latency(path, granularity='node', lstrip_s=0, rstrip_s=0)
Out[64]:
No description has been provided for this image
In [65]:
chain_latency(path, granularity='end-to-end', lstrip_s=0, rstrip_s=0)
Out[65]:
No description has been provided for this image
In [66]:
# plot best case
plot = Plot.create_response_time_timeseries_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision
BokehUserWarning: out of range integer may result in loss of precision
In [67]:
# plot best case
plot = Plot.create_response_time_histogram_plot(path, case='best')
plot.show()
WARNING : 2024-01-05 16:06:40 | The maximum number of legends drawn by default is 20. If you want all legends to be displayed, please specify the `full_legends` option to True.
In [68]:
# plot best case
plot = Plot.create_response_time_stacked_bar_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision
BokehUserWarning: out of range integer may result in loss of precision
In [ ]: